import request from '@/request'

export function findAll() {
    return request.post("permission/findAll");
}
export function findByPage() {
    return request.post("permission/findByPage");
}
export function findAllAsTree() {
    return request.post("permission/findAllAsTree");
}

export function doSaveOrUpdate(data) {
    let path = data.permissionId ? "update" : "save";
    return request.post(`permission/${path}`, data);
}

export function deleteByPermissionId(permissionId) {
    return request.post("permission/delete",permissionId,request.textConfig);
}